# curd.py
from sql_app.models import b_video_info
from sqlmodel import Session, select
from sqlalchemy import func


def create_download_info(db: Session, title: str, video_url: str, file_name: str):
    # 创建新记录
    info = b_video_info(title=title, video_url=video_url, file_name=file_name)
    db.add(info)
    db.commit()
    db.refresh(info)
    return info
